home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine CD 1995 / Archive Magazine CD 1995.iso / discs / prog_disc / volume_5 / issue_06 / benchmarks / c_source / scall < prev    next >
Encoding:
Text File  |  1991-06-04  |  268 b   |  21 lines

  1. /*
  2.  * System call overhead benchmark
  3.  */
  4.  
  5. #include "timer.h"
  6. #define TIMES 25000
  7.  
  8. main()
  9. {
  10.     register int i;
  11.  
  12.     init_timer();
  13.     start_timer();
  14.     for(i = 0; i < TIMES; i++)
  15.         getpid();
  16.  
  17.     print_elapsed("system call benchmark", REALSEC);
  18.     exit(0);
  19. }
  20.  
  21.